home *** CD-ROM | disk | FTP | other *** search
- function loadVR(imagesSWF)
- {
- images.loadMovie(imagesSWF);
- }
- function actionVR(action, param)
- {
- if(action == "poseSuivante")
- {
- poseSuivante();
- }
- else if(action == "posePrecedente")
- {
- posePrecedente();
- }
- else if(action == "angleSuivant")
- {
- angleSuivant();
- }
- else if(action == "anglePrecedent")
- {
- anglePrecedent();
- }
- else if(action == "startLectureAvant")
- {
- gotoAndStop(2);
- }
- else if(action == "startLectureArriere")
- {
- gotoAndStop(3);
- }
- else if(action == "afficherGrille")
- {
- grilles.gotoAndStop(param + 1);
- }
- else if(action == "effacerGrille")
- {
- grilles.gotoAndStop(1);
- }
- else if(action == "startZoomIn")
- {
- gotoAndStop(4);
- }
- else if(action == "startZoomOut")
- {
- gotoAndStop(5);
- }
- else if(action == "startMove")
- {
- gotoAndStop(6);
- }
- else if(action == "reset")
- {
- reset();
- }
- else
- {
- gotoAndStop(1);
- images.gotoAndStop(_root.imageCourante);
- zoneDrag.stopDrag();
- barre.btMove.gotoAndStop(1);
- }
- }
- function poseSuivante()
- {
- if(1 < images._currentFrame % 30)
- {
- images.prevFrame();
- }
- else
- {
- images.gotoAndStop(Math.floor(images._currentFrame / 30) * 30 + 24);
- }
- _root.imageCourante = images._currentFrame;
- }
- function posePrecedente()
- {
- if(images._currentFrame % 30 < 24)
- {
- images.nextFrame();
- }
- else
- {
- images.gotoAndStop(Math.floor(images._currentFrame / 30) * 30 + 1);
- }
- _root.imageCourante = images._currentFrame;
- }
- function angleSuivant()
- {
- if(images._currentFrame < 60)
- {
- images.gotoAndStop(images._currentFrame + 30);
- }
- _root.imageCourante = images._currentFrame;
- }
- function anglePrecedent()
- {
- if(30 < images._currentFrame)
- {
- images.gotoAndStop(images._currentFrame - 30);
- }
- _root.imageCourante = images._currentFrame;
- }
- function zoomIn()
- {
- if(images._xscale < 10000)
- {
- images._xscale += 20;
- images._yscale += 20;
- }
- zoneDrag._width = images._width - 560;
- zoneDrag._height = images._height - 560;
- }
- function zoomOut()
- {
- if(100 < images._xscale)
- {
- images._xscale -= 20;
- images._yscale -= 20;
- zoneDrag._width = images._width - 560;
- zoneDrag._height = images._height - 560;
- l = Math.ceil(zoneDrag._x - zoneDrag._width / 2);
- t = Math.ceil(zoneDrag._y - zoneDrag._height / 2);
- r = l + zoneDrag._width;
- b = t + zoneDrag._height;
- if(images._x < l)
- {
- images._x = l + 1;
- }
- else if(r < images._x)
- {
- images._x = r - 1;
- }
- if(images._y < t)
- {
- images._y = t + 1;
- }
- else if(b < images._y)
- {
- images._y = b - 1;
- }
- }
- }
- function reset()
- {
- images._xscale = 100;
- images._yscale = 100;
- images._x = 280;
- images._y = 280;
- zoneDrag._width = 1;
- zoneDrag._height = 1;
- actionVR("endMove");
- images.gotoAndStop(1);
- _root.imageCourante = 1;
- }
- stop();
-